home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / AppleShare API / PowerPC AppleShare API / PPC UGLibrary / UGLibraryGlue.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-12  |  1.8 KB  |  52 lines  |  [TEXT/MPS ]

  1. /*
  2. **    Apple Macintosh Developer Technical Support
  3. **
  4. **    Glue to call UGLibrary in a code resource from a PPC application
  5. **
  6. **    by Jim Luther, Apple Developer Technical Support
  7. **
  8. **    File:        UGLibraryGlue.c
  9. **
  10. **    Copyright © 1995 Apple Computer, Inc.
  11. **    All rights reserved.
  12. **
  13. **    You may incorporate this sample code into your applications without
  14. **    restriction, though the sample code has been provided "AS IS" and the
  15. **    responsibility for its operation is 100% yours.  However, what you are
  16. **    not permitted to do is to redistribute the source as "DSC Sample Code"
  17. **    after having made changes. If you're going to re-distribute the source,
  18. **    we require that you make it clear in the source that the code was
  19. **    descended from Apple Sample Code, but that you've made changes.
  20. */
  21.  
  22. #include <Types.h>
  23. #include <MixedMode.h>
  24. #include "UGLibraryGlue.h"
  25.  
  26. /*
  27. **    When linked with UGLibrary.o, the main routine gets function pointers to
  28. **    the routines in UGLibrary and puts them into the UGEntryPoints structure.
  29. **
  30. **    This file must be linked into the stand-alone code resource first!
  31. */
  32. void    main(UGEntryPoints *ePoints)
  33. {
  34.     /* Set up the entry points */
  35.     ePoints->UGOpenFile = UGOpenFile;
  36.     ePoints->UGCloseFile = UGCloseFile;
  37.     ePoints->UGCreateFile = UGCreateFile;
  38.     ePoints->UGNewUser = UGNewUser;
  39.     ePoints->UGDeleteUser = UGDeleteUser;
  40.     ePoints->UGRenameUser = UGRenameUser;
  41.     ePoints->UGGetUserInfo = UGGetUserInfo;
  42.     ePoints->UGSetUserInfo = UGSetUserInfo;
  43.     ePoints->UGAuthenticateUser = UGAuthenticateUser;
  44.     ePoints->UGNewGroup = UGNewGroup;
  45.     ePoints->UGDeleteGroup = UGDeleteGroup;
  46.     ePoints->UGRenameGroup = UGRenameGroup;
  47.     ePoints->UGGetGroupInfo = UGGetGroupInfo;
  48.     ePoints->UGAssignUserToGroup = UGAssignUserToGroup;
  49.     ePoints->UGDeleteUserFromGroup = UGDeleteUserFromGroup;
  50.     ePoints->UGGetULInfo = UGGetULInfo;
  51.     ePoints->UGSetULInfo = UGSetULInfo;
  52. }